Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use eep48 "group" to group functions in OTP documentation and shell completion #9408

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

frazze-jobb
Copy link
Contributor

No description provided.

@frazze-jobb frazze-jobb added the team:VM Assigned to OTP team VM label Feb 10, 2025
@frazze-jobb frazze-jobb self-assigned this Feb 10, 2025
Copy link
Contributor

github-actions bot commented Feb 10, 2025

CT Test Results

    19 files     788 suites   5h 59m 15s ⏱️
 8 436 tests  8 001 ✅   433 💤 2 ❌
20 055 runs  18 463 ✅ 1 589 💤 3 ❌

For more details on these failures, see this check.

Results for commit e9c0b1c.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

make/ex_doc.exs Outdated
@@ -72,47 +72,47 @@ modules =

titles =
modules
|> Enum.reduce(
|> Enum.reduce(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this? I was hoping ExDoc would do this for us now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ExDocs default sorting is:

+groups_for_docs # if there is a match in this list, put it in this group
# if there is no match in the groups for docs list, and metadata[:group] does not exist
# put in the default groups below
+Types,  
+Callbacks
+Functions
# If there are groups explicit in the module put them here
# (in the order they appeared and dont distinguish on :kind)
+ BGroup
+ CGroup
+ AGroup

groups_for_docs = [Wrap: fn a -> a[:kind] == :function && String.match(a[:group], r/falafel/) end]
Would give us:

+Wrap
+Types
+Callbacks
+Functions
+BGroup
+CGroup
+AGroup

In contrast this is how it worked before in OTP using :titles and :title:
(In the order they appear in :titles)

+Types: Bs
+Types: As
+Types:
+Callbacks: Bs
+Callbacks: As
+Callbacks:
+Bs:
+Aa:
+Functions:

In this update this has changed to alphabetical-ish (because of removal of :titles):

+Types: As
+Types: Bs
+Types:
+Callbacks: As
+Callbacks: Bs
+Callbacks:
+As:
+Bs:
+Functions:

@frazze-jobb frazze-jobb force-pushed the frazze/stdlib/support_eep48_group_metadata/OTP-19483 branch from b75aeec to 8c187a8 Compare February 19, 2025 08:28
@frazze-jobb frazze-jobb added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Feb 20, 2025
@frazze-jobb frazze-jobb force-pushed the frazze/stdlib/support_eep48_group_metadata/OTP-19483 branch from e4a0bb9 to e9c0b1c Compare February 20, 2025 11:17
@frazze-jobb frazze-jobb added the testing currently being tested, tag is used by OTP internal CI label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants